//
//  RecruitmentAPIManger.m
//  FindJob
//
//  Created by 233 on 16/3/2.
//  Copyright © 2016年 Lee. All rights reserved.
//

#import "RecruitmentAPIManger.h"
#import "NetWorkingConfig.h"
@implementation RecruitmentAPIManger
- (void)startRecruitmentInfoWithParameters:(NSDictionary *)parameter responds:(void (^)(RespondsStatus, NSString *, id))respondsBlock{
   [self startRequestURL:kRecruitmentInfoURL parameters:parameter success:^(id responds) {
       NSInteger resultCode = [responds[@"resultCode"] integerValue];
       NSString *resultDesc = responds[@"resultDesc"];
       id datas = responds[@"recruitments"];
       if (resultCode == 0) {
           if (respondsBlock) {
               respondsBlock(RespondsStatusSuccess,resultDesc,datas);
           }else{
               if (respondsBlock) {
                    respondsBlock(RespondsStatusDataError,resultDesc,datas);
               }
           }
       }
   } failure:^(NSError *error) {
       if (respondsBlock) {
           respondsBlock(RespondsStatusNotworkingError,@"网络错误",nil);
       }
   } timeout:30];
}
@end
